class NewsDetailCommentModel {
  var errcode;
  var errmsg;
  List<NewsDetailCommentItemModel>? data;
  var message;

  NewsDetailCommentModel({this.errcode, this.errmsg, this.data, this.message});

  NewsDetailCommentModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    if (json['data'] != null) {
      data = <NewsDetailCommentItemModel>[];
      json['data'].forEach((v) {
        data!.add(new NewsDetailCommentItemModel.fromJson(v));
      });
    }
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    data['message'] = this.message;
    return data;
  }
}

class NewsDetailCommentItemModel {
  var id;
  var author;
  var comment;
  var date;
  var dateBeauty;
  var parentId;
  var parentComment;
  var commentNums;
  List? children;

  NewsDetailCommentItemModel(
      {this.id,
        this.comment,
        this.author,
        this.date,
        this.dateBeauty,
        this.parentId,
        this.parentComment,
        this.children,
        this.commentNums});

  NewsDetailCommentItemModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    comment = json['comment'];
    author = json['author'];
    date = json['date'];
    dateBeauty = json['date_beauty'];
    parentId = json['parent_id'];
    parentComment = json['parent_comment'];
    children = json['children'];
    commentNums = json['comment_nums'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['comment'] = this.comment;
    data['date'] = this.date;
    data['date_beauty'] = this.dateBeauty;
    data['parent_id'] = this.parentId;
    data['parent_comment'] = this.parentComment;
    data['comment_nums'] = this.commentNums;
    return data;
  }
}
